import {useScan} from '@/composables/useScan.js'
export default {
	mounted(el, binding, vnode) {
		if (!binding.value) return false;
		useScan()
		uni.$off('scancode') // 每次进来先 移除全局自定义事件监听器
		uni.$on('scancode', function(data) {
			binding.value(binding, data.code.replace('\n',''))
		})
	}
}